home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d12 / cxl400.arc / CXLQREF.DOC < prev    next >
Text File  |  1988-11-19  |  18KB  |  781 lines

  1.                              CXL Quick Reference
  2.                              -------------------
  3.  
  4.     CXLETC.H   - Miscellaneous Functions
  5.     -------------------------------------
  6.  
  7.     void beep(void);
  8.     sounds a beep in the speaker
  9.  
  10.     char *biosver(void);
  11.     returns the BIOS version date
  12.  
  13.     int clockcal(void);
  14.     determines if a clock-calendar board is installed
  15.  
  16.     void delay_(unsigned duration);
  17.     delays program execution for a specified time period
  18.  
  19.     unsigned expmem(void);
  20.     determines the amount (if any) of expanded memory on the system
  21.  
  22.     unsigned extmem(void);
  23.     determines the amount of extended memory on an AT machine
  24.  
  25.     int gameport(void);
  26.     determines if a game port is installed
  27.  
  28.     int machid(void);
  29.     returns the value of the machine ROM ID byte
  30.  
  31.     int mathchip(void);
  32.     determines if a math coprocessor is installed
  33.  
  34.     int numflop(void);
  35.     returns the number of floppy disk drives installed
  36.  
  37.     int numpar(void);
  38.     returns the number of parallel ports
  39.  
  40.     int numser(void);
  41.     returns the number of serial ports installed
  42.  
  43.     void sound_(unsigned pitch,unsigned duration);
  44.     sounds a tone in the speaker for specified pitch and duration
  45.  
  46.     char *sysdate(int dtype);
  47.     returns a string containing the system date
  48.  
  49.     char *systime(int ttype);
  50.     returns a string containing the system time
  51.  
  52.     int tabstop(int col,int tabwidth);
  53.     calculates a tab stop from given column and tab width
  54.  
  55.     unsigned long timer(void);
  56.     returns the value of the BIOS timer
  57.  
  58.  
  59.  
  60.                                       1    
  61.  
  62.  
  63.     CXLEMS.H   - EMS Functions
  64.     ---------------------------
  65.  
  66.     unsigned emsalloc(int numpages);
  67.     allocates pages of EMS memory
  68.  
  69.     int emsdealloc(int handle);
  70.     deallocates previously allocated pages of EMS memory
  71.  
  72.     int emsexist(void);
  73.     determines if the EMS device driver is loaded.
  74.  
  75.     unsigned emsframe(void);
  76.     returns the EMS page frame base address
  77.  
  78.     unsigned emsfree(void);
  79.     returns the number of free EMS pages (16K blocks)
  80.  
  81.     int emsmap(int handle,int lpage,int ppage);
  82.     maps a logical EMS page onto a physical page address
  83.  
  84.     int emsread(char *dest,unsigned emsofs,unsigned numbytes);
  85.     reads bytes from an EMS page(s)
  86.  
  87.     unsigned emstotal(void);
  88.     returns the total number of EMS pages (16K blocks) on the system
  89.  
  90.     char *emsver(void);
  91.     returns the current EMS version
  92.  
  93.     int emswrite(char *src,unsigned emsofs,unsigned numbytes);
  94.     writes bytes to an EMS page(s)
  95.  
  96.     unsigned expmem(void);
  97.     determines the amount (if any) of expanded memory on the system
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.                                       2    
  121.  
  122.  
  123.     CXLKEY.H   - Keyboard Functions
  124.     --------------------------------
  125.  
  126.     void capsoff(void);
  127.     toggles the CapsLock key off
  128.  
  129.     void capson(void);
  130.     toggles the CapsLock key on
  131.  
  132.     void clearkeys(void);
  133.     clears the keyboard buffer
  134.  
  135.     int getchf(char *valid,int defchar);
  136.     gets a character from the keyboard from a list of valid characters
  137.  
  138.     int getns(char *str,int max);
  139.     inputs a string of specified length from the keyboard
  140.  
  141.     unsigned getxch(void);
  142.     gets a key (ASCII code/extended ASCII code) from the keyboard
  143.  
  144.     int inputsf(char *str,char *fmt);
  145.     inputs a formatted string from the keyboard
  146.  
  147.     unsigned kbstat(void);
  148.     returns the status of the keyboard control keys
  149.  
  150.     void numoff(void);
  151.     toggles the NumLock key off
  152.  
  153.     void numon(void);
  154.     toggles the NumLock key on
  155.  
  156.     void setkbloop( void (*func) (void));
  157.     sets a procedure to be called while waiting for a keypress
  158.  
  159.     int setonkey(unsigned keycode,void (*func) (void),int pass);
  160.     attaches a keypress to a function call, used by CXL input functions
  161.  
  162.     int waitkey(void);
  163.     halts execution until a key is pressed
  164.  
  165.     int waitkeyt(int duration);
  166.     halts execution until a key is pressed or specified time expires
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.                                       3    
  181.  
  182.  
  183.     CXLMOU.H   - Microsoft Mouse Functions
  184.     ---------------------------------------
  185.  
  186.     void msbpress(int button,int *bstat,int *bcount,int *x,int *y);
  187.     gets info about specific button presses of mouse
  188.  
  189.     void msbreles(int button,int *bstat,int *bcount,int *x,int *y);
  190.     gets info about specific button releases of mouse
  191.  
  192.     void mscursor(int curtype,int smask,int cmask);
  193.     sets the mouse cursor mode
  194.  
  195.     void msgotoxy(int x,int y);
  196.     sets the mouse coordinates
  197.  
  198.     void mshbounds(int left,int right);
  199.     sets the mouse horizontal bounds
  200.  
  201.     void mshidecur(void);
  202.     hides the mouse cursor
  203.  
  204.     int msinit(void);
  205.     initializes mouse/determines if present
  206.  
  207.     void msmotion(int *xcount,int *ycount);
  208.     gets info about movement of mouse
  209.  
  210.     void msshowcur(void);
  211.     reveals the mouse cursor
  212.  
  213.     void msspeed(int xratio,int yratio);
  214.     adjusts the mouse sensitivity
  215.  
  216.     void msstatus(int *bstat,int *x,int *y);
  217.     gets the mouse status
  218.  
  219.     void msvbounds(int top,int bottom);
  220.     sets the mouse vertical bounds
  221.  
  222.  
  223.  
  224.  
  225.  
  226.  
  227.  
  228.  
  229.  
  230.  
  231.  
  232.  
  233.  
  234.  
  235.  
  236.  
  237.  
  238.  
  239.  
  240.                                       4    
  241.  
  242.  
  243.     CXLPRN.H   - Printer Functions
  244.     -------------------------------
  245.  
  246.     void lcrlf(void);
  247.     prints a carriage return and line feed on the printer
  248.  
  249.     void lprintc(int ch);
  250.     prints a character on the printer
  251.  
  252.     void lprintf(const char *format,...);
  253.     sends formatted output to the printer
  254.  
  255.     void lprintns(char *str,int width);
  256.     prints a string on the printer, formatting width
  257.  
  258.     void lprints(char *str);
  259.     prints a string on the printer
  260.  
  261.     void lprintsb(char *str,int reps);
  262.     prints a bold-faced string on the printer
  263.  
  264.     void lprintsu(char *str);
  265.     prints an underlined string on the printer
  266.  
  267.     void scrndump(void);
  268.     dumps the current screen to the printer
  269.  
  270.  
  271.  
  272.  
  273.  
  274.  
  275.  
  276.  
  277.  
  278.  
  279.  
  280.  
  281.  
  282.  
  283.  
  284.  
  285.  
  286.  
  287.  
  288.  
  289.  
  290.  
  291.  
  292.  
  293.  
  294.  
  295.  
  296.  
  297.  
  298.  
  299.  
  300.                                       5    
  301.  
  302.  
  303.     CXLSTR.H   - String and Character Functions
  304.     --------------------------------------------
  305.  
  306.     int cvaltype(int ch,int ctype);
  307.     tests a character with a CXL character type code, checking validity
  308.  
  309.     int strblank(char *str);
  310.     determines if a given string is blank (whitespace)
  311.  
  312.     char *strbmatch(char *str,char *strarr[]);
  313.     returns the best match of a string in an array of strings
  314.  
  315.     int strchg(char *str,int oldch,int newch);
  316.     changes all matching characters in a string to another
  317.  
  318.     char *strcode(char *str,char *key);
  319.     encodes/decodes a string
  320.  
  321.     char *strdel(char *substr,char *str);
  322.     deletes a substring from within a string
  323.  
  324.     int strichg(char *str,int oldch,int newch);
  325.     changes all matching characters in a string to another, ignores case
  326.  
  327.     char *stridel(char *substr,char *str);
  328.     deletes a substring from within a string, ignores case
  329.  
  330.     char *striinc(char *str1,char *str2);
  331.     determines if one string is included in another, ignores case
  332.  
  333.     char *strinc(char *str1,char *str2);
  334.     determines if one string is included in another
  335.  
  336.     char *strins(char *instr,char **str,int st_pos);
  337.     inserts one string into another
  338.  
  339.     int striocc(char *str,int ch);
  340.     returns number of occurrences of a character in a string, ignores case
  341.  
  342.     char *strleft(char *str,int num_chars);
  343.     returns a new substring from the left of a string
  344.  
  345.     char *strltrim(char *str);
  346.     trims leading spaces from a string
  347.  
  348.     int strmatch(char *str1,char *str2);
  349.     compares 2 strings, returns a match score
  350.  
  351.     char *strmid(char *str,int st_pos,int num_chars);
  352.     returns a new substring from the middle of a string
  353.  
  354.     int strocc(char *str,int ch);
  355.     returns the number of occurrences of a character in a string
  356.  
  357.     char *strright(char *str,int num_chars);
  358.  
  359.  
  360.                                       6    
  361.     returns a new substring from the right of a string
  362.  
  363.     char *strrol(char *str,int count);
  364.     rotates a string specified number of characters left
  365.  
  366.     char *strror(char *str,int count);
  367.     rotates a string specified number of characters right
  368.  
  369.     char *strsetsz(char **str,int newsize);
  370.     adjusts the length of a string by truncation or padding with spaces
  371.  
  372.     char *strshl(char *str,int count);
  373.     shifts a string specified number of characters left
  374.  
  375.     char *strshr(char *str,int count);
  376.     shifts a string specified number of characters right
  377.  
  378.     char *strtrim(char *str);
  379.     trims trialing spaces from a string
  380.  
  381.     char *struplow(char *str);
  382.     converts a string to mixed upper and lower case characters
  383.  
  384.     int touplow(char *str,char *pos,int ch);
  385.     converts character to upper/lower case depending on previous character
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.  
  401.  
  402.  
  403.  
  404.  
  405.  
  406.  
  407.  
  408.  
  409.  
  410.  
  411.  
  412.  
  413.  
  414.  
  415.  
  416.  
  417.  
  418.  
  419.  
  420.                                       7    
  421.  
  422.  
  423.     CXLVID.H   - Video and Screen Functions
  424.     ----------------------------------------
  425.  
  426.     int attrib(int fore,int back,int bright,int blink);
  427.     creates an attribute
  428.  
  429.     void box_(int srow,int scol,int erow,int ecol,int btype,int attr);
  430.     displays a text box on the screen
  431.  
  432.     void boxd(int srow,int scol,int erow,int ecol,int btype,int attr);
  433.     displays a text box directly on the screen (no BIOS calls)
  434.  
  435.     void clreol_(void);
  436.     clears to the end of line
  437.  
  438.     void clrscrn(void);
  439.     clears the screen and homes the cursor
  440.  
  441.     void clrwin(srow,scol,erow,ecol);
  442.     clears a window of the screen
  443.  
  444.     int disktoscrn(char *fname);
  445.     copies a saved screen disk file to screen
  446.  
  447.     void fill_(int srow,int scol,int erow,int ecol,int ch,int attr);
  448.     fills in a region of the screen with specified character/attribute
  449.  
  450.     void filld(int srow,int scol,int erow,int ecol,int ch,int attr);
  451.     fills in a region of the screen with specified character/attribute
  452.  
  453.     void gotoxy_(int row,int col);
  454.     sets cursor coordinates on the screen
  455.  
  456.     void mode(int mode_code);
  457.     sets the video mode
  458.  
  459.     void printc(int row,int col,int attr,int ch,int count);
  460.     prints a character to the screen at specified location and attribute
  461.  
  462.     void printcd(int row,int col,int attr,int ch);
  463.     prints a character to the screen at specified location and attribute
  464.  
  465.     void prints(int row,int col,int attr,char *str);
  466.     displays a string on the screen at specified location and attribute
  467.  
  468.     void printsd(int row,int col,int attr,char *str);
  469.     displays a string on the screen at specified location and attribute
  470.  
  471.     int readchat(void);
  472.     reads the character and attribute under the cursor
  473.  
  474.     void readcur(int *row,int *col);
  475.     reads the current cursor location
  476.  
  477.     void revattr(int count);
  478.  
  479.  
  480.                                       8    
  481.     reverses the attribute of one or more characters at cursor
  482.  
  483.     int scrntodisk(char *fname);
  484.     copies the current screen to a disk file
  485.  
  486.     void setattr(int attr,int count);
  487.     sets the attribute of one or more characters at cursor
  488.  
  489.     void setcursz(int sline,int eline);
  490.     sets the cursor size
  491.  
  492.     int setlines(int numlines);
  493.     sets the number of lines on the display
  494.  
  495.     void spc(int num);
  496.     displays a specified number of spaces to the screen
  497.  
  498.     void srestore(int *sbuf);
  499.     restores a previously saved screen
  500.  
  501.     int *ssave(void);
  502.     saves the current screen to a buffer
  503.  
  504.     void videoinit(void);
  505.     initializes CXL's video system to the present video setup
  506.  
  507.     int vidtype(void);
  508.     returns the video display adapter type
  509.  
  510.     void waitvret(void);
  511.     waits for vertical retrace on CGA adapters.
  512.  
  513.  
  514.  
  515.  
  516.  
  517.  
  518.  
  519.  
  520.  
  521.  
  522.  
  523.  
  524.  
  525.  
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532.  
  533.  
  534.  
  535.  
  536.  
  537.  
  538.  
  539.  
  540.                                       9    
  541.  
  542.  
  543.     CXLWIN.H   - Windowing Functions
  544.     ---------------------------------
  545.  
  546.     int attrib(int fore,int back,int bright,int blink);
  547.     creates an attribute
  548.  
  549.     int disktowin(char *fname);
  550.     copies a saved window disk file to screen
  551.  
  552.     int vidtype(void);
  553.     returns the video display adapter type
  554.  
  555.     int wactiv(WINDOW whandle);
  556.     activates an already opened window
  557.  
  558.     int wblocked(WINDOW whandle);
  559.     determines if a window is being blocked by any other windows
  560.  
  561.     int wborder(int btype);
  562.     changes the active window's border box type
  563.  
  564.     int wbox(int wsrow,int wscol,int werow,int wecol,int btype,int attr);
  565.     displays a text box in active window
  566.  
  567.     int wcclear(int attr);
  568.     clears the active window using specified attribute
  569.  
  570.     int wcenters(int wrow,int attr,char *str);
  571.     displays a string centered in active window
  572.  
  573.     int wchgattr(int battr,int wattr);
  574.     changes attribute of the active window
  575.  
  576.     int wclear(void);
  577.     clears the active window
  578.  
  579.     int wclose(void);
  580.     closes the active window
  581.  
  582.     int wcloseall(void);
  583.     closes all open windows
  584.  
  585.     int wclreol(void);
  586.     clears to the end of the active window's line
  587.  
  588.     int wclreos(void);
  589.     clears from cursor position to the end of the active window
  590.  
  591.     WINDOW wcopy(int nsrow,int nscol);
  592.     creates a new window, duplicating the active window
  593.  
  594.     int wdelline(int row,int direc);
  595.     deletes a line in active window
  596.  
  597.     int wdupc(int ch,int count);
  598.  
  599.  
  600.                                       10   
  601.     displays a character a specified number of times in active window
  602.  
  603.     char *werrmsg(void);
  604.     returns an error message from the last windowing function
  605.  
  606.     int wfill(int wsrow,int wscol,int werow,int wecol,int ch,int attr);
  607.     fills a region in active window with specified character and attribute
  608.  
  609.     struct _wrec_t *wfindrec(WINDOW whandle);
  610.     finds address of window record of specified window handle
  611.  
  612.     int wgetc(void);
  613.     gets a character from the keyboard within the active window
  614.  
  615.     int wgetchf(char *valid,int defchar);
  616.     gets a character from the keyboard within the active window
  617.  
  618.     int wgetns(char *str,int maxlen);
  619.     gets a string from keyboard within active window, limits length of input
  620.  
  621.     int wgets(char *str);
  622.     gets a string from the keyboard within the active window
  623.  
  624.     int wgotoxy(int wrow,int wcol);
  625.     plots cursor coordinates within the active window
  626.  
  627.     WINDOW whandle(void);
  628.     returns the handle of the active window
  629.  
  630.     int *whide(int **wbuf);
  631.     hides a previously saved window
  632.  
  633.     int whline(int wsrow,int wscol,int count,int btype);
  634.     draws a horizontal text line in active window
  635.  
  636.     int winpdef(int wrow,int wcol,char *str,char *format,int fconv,
  637.                 int fattr,int update,int (*validate) (char *));
  638.     defines an area of the active window for keyboard input
  639.  
  640.     int winpread(void);
  641.     processes keyboard input of all defined areas of active window
  642.  
  643.     int winputsf(char *str,char *fmt);
  644.     inputs a formatted string from the keyboard within a window
  645.  
  646.     int winsline(int row,int direc);
  647.     inserts a line in active window
  648.  
  649.     int wintodisk(int srow,int scol,int erow,int ecol,char *fname);
  650.     copies a window of the screen to a disk file
  651.  
  652.     int wisactiv(WINDOW whandle);
  653.     determines if specified window handle is active
  654.  
  655.     int wmenudef(int wrow,int wcol,int attr,char *str,int tagchar,
  656.                  int tagattr,char *desc);
  657.     defines a window bar-selection menu option
  658.  
  659.  
  660.                                       11   
  661.  
  662.     int wmenuget(int barattr,int taginit,int pulldown);
  663.     gets a window bar-selection menu selection from the keyboard
  664.  
  665.     int wmessage(char *str,int border,int leftofs,int attr);
  666.     displays text on the top or bottom border of active window
  667.  
  668.     int wmove(int nsrow,int nscol);
  669.     moves the active window to a new location
  670.  
  671.     WINDOW wopen(int srow,int scol,int erow,int ecol,int btype,int battr,
  672.                  int wattr);
  673.     opens a screen window and makes it active
  674.  
  675.     int wperror(char *message);
  676.     displays an error message window, waits for a keypress, then returns
  677.  
  678.     int wpgotoxy(int wrow,int wcol);
  679.     plots pseudo cursor coordinates within the active window
  680.  
  681.     int wprintc(int row,int col,int attr,int ch);
  682.     prints a character in the active window, does not adjust cursor position
  683.  
  684.     int wprintf(const char *format,...);
  685.     outputs a formatted string to active window, works like printf() does
  686.  
  687.     int wprints(int row,int col,int attr,char *str);
  688.     prints a string in the active window, does not adjust cursor position
  689.  
  690.     int wputc(int ch);
  691.     prints a character in the active window at current cursor location
  692.  
  693.     int wputns(char *str,int width);
  694.     prints a string in the active window, formats width of output
  695.  
  696.     int wputs(char *str);
  697.     prints a string in the active window at the current cursor location
  698.  
  699.     void wrestore(int *wbuf);
  700.     restores a previously saved window of screen memory
  701.  
  702.     int wrjusts(int wrow,int wjcol,int attr,char *str);
  703.     displays a string right justified to specified column in active window
  704.  
  705.     int *wsave(int srow,int scol,int erow,int ecol);
  706.     saves a window of screen memory
  707.  
  708.     int wsbounds(int wssrow,int wsscol,int wserow,int wsecol);
  709.     sets active window's scroll boundaries
  710.  
  711.     int wscanf(const char *format,...);     /*  for Turbo C only  */
  712.     inputs a formatted string from the keyboard, works like scanf() does
  713.  
  714.     int wscroll(int count,int direc);
  715.     scrolls text within the active window, up or down
  716.  
  717.     int wsetesc(int option);
  718.  
  719.  
  720.                                       12   
  721.     turns Escape checking for several window input functions on/off
  722.  
  723.     int wsize(int nerow,int necol);
  724.     adjusts the size of the active window
  725.  
  726.     int wsseldef(char *str);
  727.     defines a window string selection record
  728.  
  729.     char *wsselget(int attr);
  730.     gets a window string selection from the keyboard
  731.  
  732.     int wtextattr(int attr);
  733.     sets the default text attribute of the active window
  734.  
  735.     int wtitle(char *str,int tpos,int tattr);
  736.     gives active window a title
  737.  
  738.     int *wunhide(int **wbuf);
  739.     unhides a previously hidden window
  740.  
  741.     int wvline(int wsrow,int wscol,int count,int btype);
  742.     draws a vertical text line in active window
  743.  
  744.  
  745.  
  746.  
  747.  
  748.  
  749.  
  750.  
  751.  
  752.  
  753.  
  754.  
  755.  
  756.  
  757.  
  758.  
  759.  
  760.  
  761.  
  762.  
  763.  
  764.  
  765.  
  766.  
  767.  
  768.  
  769.  
  770.  
  771.  
  772.  
  773.  
  774.  
  775.  
  776.  
  777.  
  778.  
  779.  
  780.                                       13   
  781.